/*
package com.api.gbhg.liuwenbo.test;

import com.kingbase8.util.LOGGER;

import java.io.UnsupportedEncodingException;

public class test11 {

    public static void main(String[] args) {

        response.setContentType("application/octet-stream;charset=ISO8859-1");//告诉浏览器输出内容为流
// //excel文件名
        String nameHead = "主要来宾情况报表";
        String filename = nameHead+System.currentTimeMillis()+".xlsx";
        try {
            filename = new String(filename.getBytes(), "ISO8859-1");
        } catch (UnsupportedEncodingException e1) {
            // TODO Auto-generated catch block
            LOGGER.writeLog(PrintStackTrace.getStackTraceInfo(e1));
        }
        response.setHeader("Content-Disposition","attachment;filename=" + filename);
        //导出数据开始
        LOGGER.writeLog("导出数据开始！");
        response.addHeader("Pargam", "no-cache");
        response.addHeader("Cache-Control", "no-cache");
        OutputStream os = null;
        ByteArrayInputStream tempIn = null;
        ByteArrayOutputStream outputStream = null;

        outputStream = new ByteArrayOutputStream();
        try {
            workbook.write(outputStream);
            tempIn = new ByteArrayInputStream(outputStream.toByteArray());
            response.setHeader("Content-Length", String.valueOf(tempIn.available()));
            os = response.getOutputStream();
            byte[] buffer = new byte[1024];
            int a;
            while ((a = tempIn.read(buffer)) != -1) {
                os.write(buffer, 0, a);
            }
        } catch (IOException e) {
            LOGGER.writeLog("导出失败!"+e.getMessage());
            PrintStackTrace.getStackTraceInfo(e);
        }finally {
            if(os!=null){
                try {
                    os.flush();
                    os.close();
                } catch (IOException e) {
                    e.printStackTrace();
                    LOGGER.writeLog("资源释放报错");
                }
            }
        }
        LOGGER.writeLog("导出结束!!");
        return "";
    }
}
*/
